package com.mes.system.domain;

import com.mes.common.annotation.Excel;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;

/**
 * 编码生成记录对象 sys_auto_code_result
 * @author hwg
 * @email hwg
 * @date 2023-04-22
 */
@Data
public class SysAutoCodeResult extends BaseEntity<SysAutoCodeResult>
{
    private static final long serialVersionUID = 1L;

    /** 规则ID */
    @Excel(name = "规则ID")
    @NotBlank(message = "规则ID不允许为空")
    @LogField
    @FieldRemark(name = "规则ID",field = "ruleId")
    private String ruleId;

    /** 生成日期时间 */
    @Excel(name = "生成日期时间")
    @NotBlank(message = "生成日期时间不允许为空")
    @LogField
    @FieldRemark(name = "生成日期时间",field = "genDate")
    private String genDate;

    /** 最后产生的序号 */
    @Excel(name = "最后产生的序号")
    @LogField
    @FieldRemark(name = "最后产生的序号",field = "genIndex")
    private Long genIndex;

    /** 最后产生的值 */
    @Excel(name = "最后产生的值")
    @LogField
    @FieldRemark(name = "最后产生的值",field = "lastResult")
    private String lastResult;

    /** 最后产生的流水号 */
    @Excel(name = "最后产生的流水号")
    @LogField
    @FieldRemark(name = "最后产生的流水号",field = "lastSerialNo")
    private Long lastSerialNo;

    /** 最后传入的参数 */
    @Excel(name = "最后传入的参数")
    @LogField
    @FieldRemark(name = "最后传入的参数",field = "lastInputChar")
    private String lastInputChar;

    /** 预留字段1 */
    @Excel(name = "预留字段1")
    private String attr1;

    /** 预留字段2 */
    private String attr2;

    /** 预留字段3 */
    private Long attr3;

    /** 预留字段4 */
    private Long attr4;

    /** 租户id */
    private String tenantId;

    /** 状态（0正常 1停用） */
    private String status;

    public void setRuleId(String ruleId)
    {
        this.ruleId = ruleId;
    }

    public String getRuleId()
    {
        return ruleId;
    }

    public void setGenDate(String genDate)
    {
        this.genDate = genDate;
    }

    public String getGenDate()
    {
        return genDate;
    }

    public void setGenIndex(Long genIndex)
    {
        this.genIndex = genIndex;
    }

    public Long getGenIndex()
    {
        return genIndex;
    }

    public void setLastResult(String lastResult)
    {
        this.lastResult = lastResult;
    }

    public String getLastResult()
    {
        return lastResult;
    }

    public void setLastSerialNo(Long lastSerialNo)
    {
        this.lastSerialNo = lastSerialNo;
    }

    public Long getLastSerialNo()
    {
        return lastSerialNo;
    }

    public void setLastInputChar(String lastInputChar)
    {
        this.lastInputChar = lastInputChar;
    }

    public String getLastInputChar()
    {
        return lastInputChar;
    }

    public void setAttr1(String attr1)
    {
        this.attr1 = attr1;
    }

    public String getAttr1()
    {
        return attr1;
    }

    public void setAttr2(String attr2)
    {
        this.attr2 = attr2;
    }

    public String getAttr2()
    {
        return attr2;
    }

    public void setAttr3(Long attr3)
    {
        this.attr3 = attr3;
    }

    public Long getAttr3()
    {
        return attr3;
    }

    public void setAttr4(Long attr4)
    {
        this.attr4 = attr4;
    }

    public Long getAttr4()
    {
        return attr4;
    }

    public void setTenantId(String tenantId)
    {
        this.tenantId = tenantId;
    }

    public String getTenantId()
    {
        return tenantId;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("ruleId", getRuleId())
            .append("genDate", getGenDate())
            .append("genIndex", getGenIndex())
            .append("lastResult", getLastResult())
            .append("lastSerialNo", getLastSerialNo())
            .append("lastInputChar", getLastInputChar())
            .append("attr1", getAttr1())
            .append("attr2", getAttr2())
            .append("attr3", getAttr3())
            .append("attr4", getAttr4())
            .append("tenantId", getTenantId())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
